<template>
  <div class="main">
    <Search></Search>
    <div v-html="content" class="main-wrap w"></div>
  </div>
</template>

<script>
export default {
    metaInfo:{
      title: '优趣联盟系统',
  },
  data(){
    return {
      content:''
    }
  },
  components: {
    Search:()=>import("@/components/Search"),
  },
  created(){
    const {title} = this.$route.query || {}
    title && this.getArticleByTitle(title)
  },
  methods:{
   async getArticleByTitle(title){
     const {status,data} =await this.$http.getArticleByTitle({title})
     if(status===200){
      const {ar_title,ar_content} = data
      this.content = ar_content
      document.title = ar_title
     }
    }
  }
}
</script>

<style lang="scss" scoped>
.main {
  &-wrap {
    background-color: #fff;
    padding: 50px;
    margin-top: 20px;
  }
}
</style>
